/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-12-25 11:11:44
 * 天凉好个秋
 */
import { useSettingStore } from "@/store/setting";
import { LangEnmu } from "@/types/store/settingStoreType";

export const useLangSetting = () => {

  const settingStore = useSettingStore();

  const currentLang = settingStore.lang;
  
  // 设置语言
  const setLang = (lang: LangEnmu) => {
    settingStore.setLang(lang);
    location.reload()
  };

  return {
    currentLang,
    setLang
  };
};
